package org.example.demo21.chain.impl;

import com.alibaba.nacos.common.utils.StringUtils;
import org.example.demo21.chain.interfaces.Filter;
import org.example.demo21.entity.bo.DemoBO;

/**
 *
 * @author guocong
 * @since 2024/3/29 11:54
 */
public class NameFilter implements Filter {


    @Override
    public boolean doFilter(DemoBO demoBO) {
        boolean blank = StringUtils.isBlank(demoBO.getName());
        if (blank) {
            System.out.println("\033[31m 没写名!!! \033[0m");
        }
        return !blank;
    }
}
